1. Field
Various embodiments relate to a computer-readable medium storing a data processing program in each computer that constitutes a group of computers capable of communicating with each other, and relates to a server apparatus and a data processing method.
2. Description of the Related Art
In recent years, in a database system that is accessible via a network system, according to an increase in amount of data to be arranged, and an increase in access to the data, there has been an increase in the configuration in which the data are managed by being distributed in a plurality of apparatuses, such as servers and other storages (hereinafter collectively referred to as “server apparatus”). In the case in which data are distributed and arranged in this way, the redundancy is provided in many cases for load distribution and availability improvement in such a manner that replicas (duplicates) of one data are generated so as to be respectively arranged in a plurality of servers.
The total number of replicas, including the source data and the data generated at this time, is referred to as the number of replicas. Usually, the number of replicas is determined according to an access pattern to the data, and the like. For example, in the case where all data are only referred to, all the data are copied in all the server apparatuses in which the data are to be arranged. That is, the number of replicas is equal to the number of the server apparatuses. There are the following advantages in such distribution of data.
Data are arranged in all the server apparatuses, and hence the processing load due to reference requests from clients can be easily distributed by preparing a load balancer that is simply configured so as to distribute each of the reference requests to one of the server apparatuses.
Even when reference requests to the same data are issued from a plurality of clients, the reference requests can be distributed in correspondence with the number of servers.
Availability is high because data are not lost unless all the server apparatuses are down.
On the other hand, in the case where data are not only referred to but also updated, and where the data are copied in all the server apparatuses as described above, the update of data needs to be reflected in all the server apparatuses each time the update of data is performed. As a result, the copy processing is frequently generated in each of the server apparatuses, so that the processing efficiency is lowered. Further, even in the case in which the data are updated, when the number of replicas is set to 1 (no copy state) in order to maximize the processing efficiency of each of the server apparatuses, and when the reference requests are concentrated on the same data, there may be a case where the load distribution cannot be performed and, thereby, the response time to the reference request is increased. Further, other than the server apparatus with the data arranged therein, a standby server apparatus with the same data arranged therein is not prepared, and hence there is a possibility that when the server apparatus is down, the data is lost. As a result, the availability is also significantly reduced.
Therefore, in many conventional cases, the number of replicas is set to a value that is two or more, and which is less than the total number of the server apparatuses. In practice, the number of replicas is determined in consideration of satisfying the access pattern (reference/update ratio and frequency) of data and the availability required by the manager and user of the database. Thereby, data access in both reference and update can be efficiently performed. (Japanese Patent Application Laid-Open Publication No. 2-231676).